home *** CD-ROM | disk | FTP | other *** search
/ Champak 138 / Volume 138 Aug 19 2011 - Damaged.iso / Games / shadez.swf / scripts / Local / Game / Thing / CStrikeArtillery.as < prev    next >
Encoding:
Text File  |  2011-08-19  |  1.8 KB  |  67 lines

  1. package Local.Game.Thing
  2. {
  3.    import Local.Game.World.*;
  4.    import Local.Game.World.Map.*;
  5.    import Local.Game.World.Map.Cell.*;
  6.    import Local.Math.*;
  7.    import STC9.System.*;
  8.    import flash.display.*;
  9.    import flash.events.*;
  10.    import flash.geom.*;
  11.    
  12.    public class CStrikeArtillery extends CStrike
  13.    {
  14.        
  15.       
  16.       public var mWaitCount:int;
  17.       
  18.       public var mShellCount:int;
  19.       
  20.       public var mShellSpread:Number = 200;
  21.       
  22.       public var mTargetPosition:CPosition;
  23.       
  24.       public function CStrikeArtillery(param1:*)
  25.       {
  26.          mShellSpread = 200;
  27.          super(new CPosition(0,-10));
  28.          mType = "strikeartillery";
  29.          mShellCount = 50;
  30.          Process = Process_Normal;
  31.          mTargetPosition = (param1 is CPosition ? param1 : param1.mPosition).Clone();
  32.          IncrementFired();
  33.          mShowOnMap = true;
  34.       }
  35.       
  36.       public function Process_Normal() : void
  37.       {
  38.          var _loc1_:*;
  39.          ┬º┬ºpush((_loc1_ = ┬º┬ºfindproperty(mWaitCount)).mWaitCount);
  40.          if(true)
  41.          {
  42.             var _loc2_:*;
  43.             ┬º┬ºpush(_loc2_ = ┬º┬ºpop() - 1);
  44.             if(true)
  45.             {
  46.                _loc1_.mWaitCount = _loc2_;
  47.             }
  48.          }
  49.          if(┬º┬ºpop() < 0)
  50.          {
  51.             ┬º┬ºpush(_loc2_ = (_loc1_ = ┬º┬ºfindproperty(mShellCount)).mShellCount - 1);
  52.             if(true)
  53.             {
  54.                _loc1_.mShellCount = _loc2_;
  55.             }
  56.             if(┬º┬ºpop() < 0)
  57.             {
  58.                DispatchDispose();
  59.             }
  60.             mWaitCount = SECONDS / 5;
  61.             AddThing(new CShotArtilleryShell(new CPosition(mTargetPosition.x + Math.random() * mShellSpread - mShellSpread * 0.5,mLandscape.GetAltitude(mTargetPosition.x)),-1000));
  62.          }
  63.          Process_Children();
  64.       }
  65.    }
  66. }
  67.